import myfetch from "../assets/myfetch"
import token from "./token"
function getMyInfo(){
    let userinfo={}
    userinfo.department=localStorage.getItem("haust-twxsh-department")
    userinfo.name=localStorage.getItem("haust-twxsh-name")
    userinfo.status=localStorage.getItem("haust-twxsh-status")
    userinfo.qx=localStorage.getItem("haust-twxsh-qx")
    userinfo.id=localStorage.getItem("haust-twxsh-id")
    return userinfo
  }

  function setUserInfo(param){

    }
  function getUserInfo(id){
     let param = {
       id:token.getToken(id)
     }
     return myfetch.myget('/user/getUserInfo', param)
  }
  function getDepartmentPerson(id){
     let param = {
       department:getMyInfo().department
     }
     return myfetch.myget('/user/getDepartmentPerson', param)
  }
export default {
  getMyInfo,getUserInfo,getDepartmentPerson
}
